using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.WindowsMobile.Status;
using System.Windows.Forms;

namespace Christian.Helle.PocketNews.PocketPC
{
	public static class Connection
	{
		public static bool VerifyConnection()
		{
			if (SystemState.ConnectionsDesktopCount > 0 ||
					SystemState.ConnectionsNetworkCount > 0 ||
					SystemState.ConnectionsCellularCount > 0) {
				return true;
			} else {
				if (SystemState.ConnectionsCellularCount > 0) {
					if (DialogResult.Yes == MessageBox.Show(
							"Do you want to use GPRS?",
							"Confirm",
							MessageBoxButtons.YesNo,
							MessageBoxIcon.Question,
							MessageBoxDefaultButton.Button1)) {
						return true;
					}
				} else {
					return true;
				}
				return false;
			}
		}
	}
}
